package com.maykk.Demo02;

/**
 * @ClassName Person
 * @Description: TODO 定义Person
 * @Author: MaykkSTAR@163.com
 */
public class Person {
    String name;
    int age;
    String sex;
    String job;

    public Person(){
        System.out.println("我是无参构造方法");
    }
    public Person(String name) {
        this();
        this.name = name;
    }
    public Person(String name, int age) {
        this(name);
        this.age = age;
    }
    public Person(String name, int age, String sex) {
        this(name, age);
        this.sex = sex;
    }
    public Person(String name, int age, String sex, String job) {
        this(name, age, sex);
        this.job = job;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", job='" + job + '\'' +
                '}';
    }
}
